package cn.iocoder.yudao.module.famous.doctor.dal.mysql.famNoticeClose;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.famous.doctor.dal.dataobject.famNoticeClose.FamNoticeCloseDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.famous.doctor.controller.app.famNoticeClose.vo.*;

/**
 * 中医-公告用户关闭 Mapper
 *
 * @author 档案
 */
@Mapper
public interface FamNoticeCloseMapper extends BaseMapperX<FamNoticeCloseDO> {

    default PageResult<FamNoticeCloseDO> selectPage(AppFamNoticeClosePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FamNoticeCloseDO>()
                .eqIfPresent(FamNoticeCloseDO::getNoticeId, reqVO.getNoticeId())
                .eqIfPresent(FamNoticeCloseDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(FamNoticeCloseDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FamNoticeCloseDO::getId));
    }

    default List<FamNoticeCloseDO> selectList(AppFamNoticeCloseExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<FamNoticeCloseDO>()
                .eqIfPresent(FamNoticeCloseDO::getNoticeId, reqVO.getNoticeId())
                .eqIfPresent(FamNoticeCloseDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(FamNoticeCloseDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FamNoticeCloseDO::getId));
    }

}
